<%--
  Created by IntelliJ IDEA.
  User: dzw
  Date: 2018/3/13
  Time: 16:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<form id="form_resident_check" class="panel-body form-horizontal form-padding">

  <input type="hidden" name="parentId" id="parentId" value="${parentId}"/>
  <input type="hidden" name="keyId" id="keyId" value="${keyId}"/>

  <div class="form-group">
    <label class="col-md-2 control-label">街道字典项<i class="fa fa-asterisk txt-color-red"></i></label>
    <div class="col-md-8">
      <input readonly type="text" class="form-control" id="text" value="${text}" >
    </div>
  </div>

  <div class="form-group">
    <label class="col-md-2 control-label">居民区名称<i class="fa fa-asterisk txt-color-red"></i></label>
    <div class="col-md-8">
      <input type="text" class="form-control" id="name" name="name" value="${name}" >
    </div>
  </div>

</form>

<script>

  function fn_resident_check_save(callback){
    if($("#name").val()=="" || $("#name").val()==null){
      __toastr_error("请输入居民区名称");
      return false;
    }

    __confirm_dialog("居民区配置","确定要操作此居民区吗？",function(){
      __form_save("form_resident_check", "<%=path%>/com/resident/saveResident", function(data){
        if(data.state == 1){
          callback(data);
        }else{
          callback();
        }
      }, function(){
        callback();
      })
    });
  }

</script>
